﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：ConsumerAccountInfo
// 文件功能描述：消费账号维护
//
// 
// 创建标识：2012-06-15 王冲
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAO.WaiGaoQiao;

namespace Model.WaiGaoQiao
{
    public class ConsumerAccountInfo
    {
        DataAccessConsumerAccount dar;
        /// <summary>
        /// 获取账号信息
        /// </summary>
        /// <returns></returns>
        public DataSet GetList(int pagesize, int startindex)
        {
            dar = new DataAccessConsumerAccount();
            return dar.GetList(pagesize, startindex);
        }

        /// <summary>
        /// 获取账号数量
        /// </summary>
        /// <returns></returns>
        public int GetListCount()
        {
            dar = new DataAccessConsumerAccount();
            return dar.GetListCount();
        }

        /// <summary>
        /// 删除账号
        /// </summary>
        /// <param name="roleid"></param>
        /// <returns></returns>
        public int DeleteConsumerAccount(string id)
        {
            dar = new DataAccessConsumerAccount();
            return dar.DeleteConsumerAccount(id);
        }

        /// <summary>
        /// 保存账号(新增界面下)
        /// </summary>
        /// <param name="supp"></param>
        /// <returns></returns>
        public int SaveConsumerAccount(object[] yax)
        {
            dar = new DataAccessConsumerAccount();
            return dar.SaveConsumerAccount(yax);
        }

        /// <summary>
        /// 保存账号(修改界面下)
        /// </summary>
        /// <param name="supp"></param>
        /// <returns></returns>
        public int SaveConsumerAccountEdit(object[] supp)
        {
            dar = new DataAccessConsumerAccount();
            return dar.SaveConsumerAccountEdit(supp);
        }

        /// <summary>
        /// 根据编号获取一条账号信息
        /// </summary>
        /// <param name="supplierNo"></param>
        /// <returns></returns>
        public DataSet GetConsumerAccountInfoOne(string id)
        {
            dar = new DataAccessConsumerAccount();
            return dar.GetConsumerAccountInfoOne(id);
        }
    }
}
